/*
 * All rights Reserved, Designed By Rylynn
 * @ClassName:  Job
 * @Description:
 * @author: rylynn
 * @date:   2021/7/13
 *
 */

package org.etnetwork.engine;

import java.util.concurrent.*;

public class Job extends Thread {
    private String jobName;
    private Long priority;

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getJobName() {
        return jobName;
    }

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        ExecutorService executor = Executors.newScheduledThreadPool(10);
        FutureTask<String> futureTask = new FutureTask<String>(new Callable<String>() {
            @Override
            public String call() throws Exception {
                while (true) {
                    System.out.println("111");
                    Thread.sleep(1000);
                }
            }
        });
        executor.submit(futureTask);
        System.out.println(futureTask.isDone());
    }
}

